﻿@model PagedResult<SlaMonitoringLogDto>
@using System.Configuration
@using EnetaMvc.Infrastructure
@using EnetaMvc.ApplicationServices.Dto
@{
    ViewBag.Title = "Sla Monitoring Logs";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

<style>
h3 {
    font-size: 16px !important;
    font-weight: bold;
}
    ul {
        margin-left:0px;
        padding-left:0px;
    }
</style>
<div class="content-txt">
    <div class="blog-head">
        <h2>Sla Monitoring Logs</h2>
    </div>
    <div>
        <a href="@Url.Action("ExportToExcel")">Export to Excel</a>
    </div>
    <div class="content-info-area">
        <table>
            <tr>
                <th>Id</th>
                <th>Content</th>
                <th>Previous User</th>
                <th>Previous State</th>
                <th>Previous Date</th>
                <th>New User</th>
                <th>New State</th>
                <th>New Date</th>
            </tr>
        @foreach (var item in Model.Results)
        { 
            <tr>
                <td>@item.Id</td>
                <td>@item.LogName</td>
                <td>@item.PreviousPublishStateUser</td>
                <td>@item.PreviousPublishState</td>
                <td>@item.PreviousStateDate.ToString("dd.MM.yyyy HH:mm")</td>
                <td>@item.User</td>
                <td>@item.NewPublishState</td>
                <td>@item.NewStateDate.ToString("dd.MM.yyyy HH:mm")</td>
            </tr>
        }
        </table>
        @Html.GetPager(Model, Url.Content("~/admin/SlaMonitoringLogs/Index/"))
    </div>
</div>
